/**
 * @author guojiteng
 */
import request from '@/utils/request'
/**
 * 创建关口
 * @param {*} data
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/rushPass/insert',
    method: 'post',
    data
  })
}
/**
 * 编辑关口
 * @param {*} data
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/rushPass/update',
    method: 'post',
    data
  })
}
/**
 * 删除关口
 * @param {*} id
 */
export function del(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/rushPass/deleteById',
    method: 'get',
    params: { id }
  })
}

/**
 * 获取关口信息-用于编辑回显
 * @param {*} id
 */
export function get(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/rushPass/get',
    method: 'post',
    data
  })
}
/**
 * 一键生成关口
 * @param {*} id
 */
export function generate(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/rushPass/oneTouch',
    method: 'post',
    data
  })
}
